home *** CD-ROM | disk | FTP | other *** search
- Path: thor.tu.hac.com!collins
- From: collins@thor.tu.hac.com (Ron Collins)
- Newsgroups: comp.lang.c
- Subject: Re: Unbuffered character input...
- Date: 1 Feb 1996 00:59:45 GMT
- Organization: Advanced Depot Systems
- Message-ID: <4ep3a1$bee@hacgate2.hac.com>
- References: <Pine.SGI.3.91.960129190205.27936A-100000@tahiti.cs.unm.edu> <4elf0t$5vd@ixnews2.ix.netcom.com>
- NNTP-Posting-Host: thor.tu.hac.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Kevin Landry (kevgar@ix.netcom.com) wrote:
- : Caleb Haley <chaley@tahiti.cs.unm.edu> wrote:
-
- : >Greetings!
-
- : >Just curious--is there a way to do unbuffered character input in c?
- : >i.e. getting just one character without waiting for a carriage return
- : >(enter)...
-
- : I believe there are two commands in C that do this. getch() is
- : unbuffered input without echo and getche() has the echo. Hope this
- : helps.
-
- : -kevgar@ix.netcom.com
- : "Cry havoc, and let slip
- : the dogs of war!!"
-
- No, these are not standard C functions. (What is a "command"?) These
- functions are only available on DOS compilers as non-standard extensions.
-
- There is no portable way to get unbuffered input, since C can't possibly
- know all about the dozens or hundreds of different terminal types available
- on all the machines made around the world.
-
- For best results (i.e., least evil alternative), check out the "curses"
- library available for your machine. Most common flavors can be had for
- free from any SimTel mirror.
-
-
- -- Collins --
-
- -----
- The views expressed here are mine alone.
-
- Ron Collins/Hughes Aircraft Company/M20,P20/Tucson Az 85706
- rcollins@thor.tu.hac.com collins@seagull.rtd.com
- ยก----
-
-
-